<!-- 导航条
================================================== -->
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="{:Url('index/index')}">HeilPHP</a>
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <div class="nav-collapse collapse">
                <ul class="nav">
					{taglib name="\app\index\taglib\Heil,\app\index\taglib\Article" /}
					{Heil:nav id="nav"}
						{eq name="nav.pid" value="0"}
                        <li>
							<a href="{$nav.url|get_nav_url}" target="{eq name='nav.target' value='1'}_blank<else/>_self{/eq}">{$nav.title}</a>
                        </li>
						{/eq}
					{/Heil:nav}
                </ul>
            </div>
            <div class="nav-collapse collapse pull-right">
				{if condition="is_login()"}
                    <ul class="nav" style="margin-right:0">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding-left:0;padding-right:0">{:get_username()} <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="{:Url('User/profile')}">修改密码</a></li>
                                <li><a href="{:Url('User/logout')}">退出</a></li>
                            </ul>
                        </li>
                    </ul>
				{else/}
                    <ul class="nav" style="margin-right:0">
                        <li>
                            <a href="{:Url('User/login')}">登录</a>
                        </li>
                        <li>
                            <a href="{:Url('User/register')}" style="padding-left:0;padding-right:0">注册</a>
                        </li>
                    </ul>
				{/if}
            </div>
        </div>
    </div>
</div>
